package com.micro.modual.extension;

import com.micro.common.MicroConstant;
import com.micro.common.biz.GeneratorCodeUtil;
import com.micro.common.util.SnowFlakeUtil;
import com.micro.modual.entity.UserVisual;
import com.micro.modual.model.bo.uservisual.UserVisualBO;

/**
 * <h1>用户视力表 延展类</h1>
 * @author LevelCoder
 * @version V1.0.0
 * @email LevelCoder@126.com
 * @date 2020-08-04 00:23:26
 */
public class UserVisualExtension {

    /**
     * <h2>转换: 用户视力表 新增</h2>
     * @param userVisualBO {@link UserVisualBO} 用户视力表 新增/修改 请求对象
     * @return {@link UserVisual} 用户视力表
     */
    public static UserVisual converAddUserVisual(UserVisualBO userVisualBO) {
        UserVisual userVisual = new UserVisual();
        userVisual.setId(SnowFlakeUtil.getId());
                                                            userVisual.setUserCode(userVisualBO.getUserCode());
                                                    userVisual.setCustomerName(userVisualBO.getCustomerName());
                                                    userVisual.setCreateTime(userVisualBO.getCreateTime());
                                                    userVisual.setEyeRemark(userVisualBO.getEyeRemark());
                                                    userVisual.setEyeDetail(userVisualBO.getEyeDetail());
                                                    userVisual.setMachineChecklist(userVisualBO.getMachineChecklist());
                                                    userVisual.setCheckTime(userVisualBO.getCheckTime());
                                                    userVisual.setIsDefault(userVisualBO.getIsDefault());
                            return userVisual;
    }

    /**
     * <h2>转换: 用户视力表 修改</h2>
     * @param userVisualBO {@link UserVisualBO} 用户视力表 新增/修改 请求对象
     * @return {@link UserVisual} 用户视力表
     */
    public static UserVisual converEditUserVisual(UserVisualBO userVisualBO) {
        UserVisual userVisual = new UserVisual();
        userVisual.setId(userVisualBO.getId());
                                                        userVisual.setUserCode(userVisualBO.getUserCode());
                                                userVisual.setCustomerName(userVisualBO.getCustomerName());
                                                userVisual.setCreateTime(userVisualBO.getCreateTime());
                                                userVisual.setEyeRemark(userVisualBO.getEyeRemark());
                                                userVisual.setEyeDetail(userVisualBO.getEyeDetail());
                                                userVisual.setMachineChecklist(userVisualBO.getMachineChecklist());
                                                userVisual.setCheckTime(userVisualBO.getCheckTime());
                                                userVisual.setIsDefault(userVisualBO.getIsDefault());
                            return userVisual;
    }
}
